home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / qbbs / qktmbps.zip / QKTMBPS.DOC next >
Text File  |  1990-08-16  |  3KB  |  106 lines

  1.  
  2.  
  3.                        QuickBBS Time/BPS Control
  4.  
  5.                                   v1.0
  6.  
  7.                             Christopher Hall
  8.                                PC Network
  9.                            6067 McKinney, NE
  10.                          Albuquerque, NM  87109
  11.  
  12.                              (505) 821-5341
  13.                           CompuServe 72150,752
  14.                               Fido 1:301/2
  15.  
  16. Introduction:
  17.  
  18. I found myself needing a Utility that would allow me to monitor what
  19. External Activities would be allowed with a Type 15 Exit from QuickBBS.
  20. There was no suitable way to limit certain functions based on Time of
  21. Day and Baud Rate.
  22.  
  23. For Example:  Running Doors, Uploading, Downloading, etc.
  24. (Transfers in particular since I use FileDoor!)
  25.  
  26. Thus, this program was born!
  27.  
  28. I am including the source code - just for those of you who might wish to
  29. expand on its functionality - it is not documented at all - but that's
  30. usually how I work!  Also, you will need Turbo Power's EXCELLENT Object
  31. Pro Libray in order to compile as is.
  32.  
  33. What Does it Do?:
  34.  
  35. The only thing this program does is Exit with one of two ErrorLevels!
  36. It is designed to be run in your BBS Batch file BEFORE any other
  37. possible program.  If certain conditions are met (Time of Day and Baud
  38. Rate), then it will Exit with ErrorLevel 0 - otherwise, with ErrorLevel 1.
  39.  
  40. The Sysop must first design a QkTmBPS.Evt file (see Sample File).  This
  41. file defines certain TAG NAMES.  It is set up similar to other Event
  42. Files.  Within each TAG NAME you may configure certain ALLOWABLE Baud
  43. Rates and certain Time Frames.  You may have up to 10 TAG NAMES and up
  44. to 10 Conditions within each TAG NAME.  (Am I confusing you yet?)
  45.  
  46. Once defined - the QkTmBPS.Evt file will be compiled into a QkTmBPS.Prm
  47. file - just to speed up the operation.  This is done automatically the
  48. first time you run the program or whenever you change the QkTmBPS.Evt
  49. file.
  50.  
  51. When executed - the program accepts a TAG NAME as the only allowable
  52. command line parameter.  It then determines the Current Time of Day,
  53. Reads the Dorinfo1.Def file to determine the Current Baud Rate, reads
  54. the QkTmBPS.Prm file based on the Current TAG Name and Exits accordingly.
  55.  
  56. Example:
  57.  
  58. QuickBBS -B%1 -E0
  59. goto After_Quick
  60. .
  61. .
  62. :After_Quick
  63. if ErrorLevel 30 GoTo aDoor
  64. if ErrorLevel 20 GoTo Upload
  65. if ErrorLevel 10 GoTo Download
  66. .
  67. .
  68. :aDoor
  69. QkTmBPS DOOR
  70. if ErrorLevel 1 GoTo ReStart_Quick
  71. SomeDoor.Exe
  72. goto ReStart_Quick
  73. .
  74. :UpLoad
  75. QkTmBPS UpLoad
  76. if ErrorLevel 1 GoTo ReStart_Quick
  77. FileDoor -dU
  78. goto ReStart_Quick
  79. .
  80. :DownLoad
  81. QkTmBPS DownLoad
  82. if ErrorLevel 1 GoTo ReStart_Quick
  83. FileDoor -dD
  84. .
  85. ETC................................
  86.  
  87. Of course, you could also echo something to the User so that he'd know
  88. what was happening:
  89.  
  90. QkTmBPS DOOR
  91. if ErrorLevel 1 goto NODOOR
  92. SomeDoor.Exe
  93. goto ReStart_Quick
  94.  
  95. :NODOOR
  96. echo Sorry, Doors are not allowed at this time! >COM1
  97. goto ReStart_Quick
  98.  
  99. ------------------------------------------------------------------------
  100.  
  101. That's about it!  If you're a little more interested - just check out
  102. the source code.
  103.  
  104. Christopher Hall
  105.  
  106.